package com.wmh.baseservice.user.pojo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-04-28
 */
@ApiModel(value="UsGoodsOrder对象", description="商品订单表")
public class UsGoodsOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态：	0待付款	1待发货	2待收货	3待评价	4已完成	-1已取消")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "唯一订单号")
    private String orderNum;

    @ApiModelProperty(value = "商品快照")
    private String snapshot;

    @ApiModelProperty(value = "总价(应付价格)")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "实付价格")
    private BigDecimal realPrice;

    private Long usId;

    @ApiModelProperty(value = "收货地址id")
    private Long addressId;

    @ApiModelProperty(value = "1平台商品 2商家商品")
    private Integer type;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "快递单号")
    private String expressNumber;

    @ApiModelProperty(value = "商家id（购物车购买时，如果有多个商家的商品，按商家区分订单）")
    private Long merchantId;

    @ApiModelProperty(value = "支付类型1余额支付 2微信支付")
    private Integer payType;

    @ApiModelProperty(value = "售后状态:	0:未申请售后	1:申请退款中	2:退款完成	")
    private Integer afterSaleStatus;

    @ApiModelProperty(value = "收货时间")
    private Date deliveryTime;


    @TableField(exist = false)
    private String storeName;

    @TableField(exist = false)
    private String storeAvatar;

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getStoreAvatar() {
        return storeAvatar;
    }

    public void setStoreAvatar(String storeAvatar) {
        this.storeAvatar = storeAvatar;
    }
    public Long getId() {
        return id;
    }

    public UsGoodsOrder setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public UsGoodsOrder setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public UsGoodsOrder setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public UsGoodsOrder setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public UsGoodsOrder setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public UsGoodsOrder setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public String getOrderNum() {
        return orderNum;
    }

    public UsGoodsOrder setOrderNum(String orderNum) {
        this.orderNum = orderNum;
        return this;
    }
    public String getSnapshot() {
        return snapshot;
    }

    public UsGoodsOrder setSnapshot(String snapshot) {
        this.snapshot = snapshot;
        return this;
    }
    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public UsGoodsOrder setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
        return this;
    }
    public BigDecimal getRealPrice() {
        return realPrice;
    }

    public UsGoodsOrder setRealPrice(BigDecimal realPrice) {
        this.realPrice = realPrice;
        return this;
    }
    public Long getUsId() {
        return usId;
    }

    public UsGoodsOrder setUsId(Long usId) {
        this.usId = usId;
        return this;
    }
    public Long getAddressId() {
        return addressId;
    }

    public UsGoodsOrder setAddressId(Long addressId) {
        this.addressId = addressId;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public UsGoodsOrder setType(Integer type) {
        this.type = type;
        return this;
    }
    public Date getPayTime() {
        return payTime;
    }

    public UsGoodsOrder setPayTime(Date payTime) {
        this.payTime = payTime;
        return this;
    }
    public String getExpressNumber() {
        return expressNumber;
    }

    public UsGoodsOrder setExpressNumber(String expressNumber) {
        this.expressNumber = expressNumber;
        return this;
    }
    public Long getMerchantId() {
        return merchantId;
    }

    public UsGoodsOrder setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
        return this;
    }
    public Integer getPayType() {
        return payType;
    }

    public UsGoodsOrder setPayType(Integer payType) {
        this.payType = payType;
        return this;
    }
    public Integer getAfterSaleStatus() {
        return afterSaleStatus;
    }

    public UsGoodsOrder setAfterSaleStatus(Integer afterSaleStatus) {
        this.afterSaleStatus = afterSaleStatus;
        return this;
    }
    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public UsGoodsOrder setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String ORDER_NUM = "order_num";

    public static final String SNAPSHOT = "snapshot";

    public static final String TOTAL_PRICE = "total_price";

    public static final String REAL_PRICE = "real_price";

    public static final String US_ID = "us_id";

    public static final String ADDRESS_ID = "address_id";

    public static final String TYPE = "type";

    public static final String PAY_TIME = "pay_time";

    public static final String EXPRESS_NUMBER = "express_number";

    public static final String MERCHANT_ID = "merchant_id";

    public static final String PAY_TYPE = "pay_type";

    public static final String AFTER_SALE_STATUS = "after_sale_status";

    public static final String DELIVERY_TIME = "delivery_time";

    @Override
    public String toString() {
        return "UsGoodsOrder{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", orderNum=" + orderNum +
            ", snapshot=" + snapshot +
            ", totalPrice=" + totalPrice +
            ", realPrice=" + realPrice +
            ", usId=" + usId +
            ", addressId=" + addressId +
            ", type=" + type +
            ", payTime=" + payTime +
            ", expressNumber=" + expressNumber +
            ", merchantId=" + merchantId +
            ", payType=" + payType +
            ", afterSaleStatus=" + afterSaleStatus +
            ", deliveryTime=" + deliveryTime +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsGoodsOrder.ID
            ,UsGoodsOrder.STATUS
            ,UsGoodsOrder.REMARK
            ,UsGoodsOrder.VERSION
            ,UsGoodsOrder.CREATE_TIME
            ,UsGoodsOrder.UPDATE_TIME
            ,UsGoodsOrder.ORDER_NUM
            ,UsGoodsOrder.SNAPSHOT
            ,UsGoodsOrder.TOTAL_PRICE
            ,UsGoodsOrder.REAL_PRICE
            ,UsGoodsOrder.US_ID
            ,UsGoodsOrder.ADDRESS_ID
            ,UsGoodsOrder.TYPE
            ,UsGoodsOrder.PAY_TIME
            ,UsGoodsOrder.EXPRESS_NUMBER
            ,UsGoodsOrder.MERCHANT_ID
            ,UsGoodsOrder.PAY_TYPE
            ,UsGoodsOrder.AFTER_SALE_STATUS
            ,UsGoodsOrder.DELIVERY_TIME
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}